]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
panel: Restrict app menu width
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 5 Feb 2019 00:11:43 +0000 (01:11 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 6 Feb 2019 17:29:15 +0000 (18:29 +0100)
Window titles aren't restricted in length, so the menu may end up unwieldily
width. Commit 0bec76b6ee therefore limited the app context menus, but that
got accidentally dropped in commit 0ded0dbfd5. Add back the limitation and
extend it to the new app menu as well.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/624

data/theme/gnome-shell-sass/_common.scss
js/ui/panel.js

index cba7914c830e8bbd6892d4759f8ea896faa745e9..3eb95331db94f9b6f8538058bffa74f7a07b6693 100644 (file)
@@ -1096,6 +1096,11 @@ StScrollBar {
     .label-shadow { color: transparent; }
   }
 
+  .app-menu,
+  .app-well-menu {
+    max-width: 27.25em;
+  }
+
   .aggregate-menu {
     min-width: 21em;
     .popup-menu-icon { padding: 0 4px; }
index fb846fc6290fcf784359ac70a62a458d801d88bf..1a8d88131bd92b70e47b87505ab69ac7a89e08f9 100644 (file)
@@ -78,6 +78,8 @@ class AppMenu extends PopupMenu.PopupMenu {
     constructor(sourceActor) {
         super(sourceActor, 0.0, St.Side.TOP);
 
+        this.actor.add_style_class_name('app-menu');
+
         this._app = null;
         this._appSystem = Shell.AppSystem.get_default();